release: v0.1.151 - secure cron config and backup fixes - #107
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c5dd1f821
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| cronSecret = schedule.secretEnvVar | ||
| ? envs[schedule.secretEnvVar] || "" | ||
| : envs.CRON_SECRET || ""; | ||
| } |
There was a problem hiding this comment.
Read cron secrets from the hydrated resource
When an HTTP cron specifies secretEnvVar, it always fails with the new “missing or empty” error in production: DrizzleUnitOfWork does not expose a resourceSecretRepository, so the optional lookup inside this transaction always returns undefined, regardless of whether the variable is configured. The resource loaded above is already hydrated with encrypted envVars; parse that field directly or add a real repository to the unit of work before relying on this value.
Useful? React with 👍 / 👎.
| const upstandJsonPath = path.join(clonePath, "upstand.json"); | ||
| const vercelJsonPath = path.join(clonePath, "vercel.json"); | ||
| let configContent: string | null = null; | ||
| if (fs.existsSync(upstandJsonPath)) { | ||
| configContent = fs.readFileSync(upstandJsonPath, "utf-8"); | ||
| } else if (fs.existsSync(vercelJsonPath)) { | ||
| configContent = fs.readFileSync(vercelJsonPath, "utf-8"); | ||
| } |
There was a problem hiding this comment.
Preserve vercel.json cron discovery
For repositories that declare cron jobs only in vercel.json, this callback now ignores the file entirely, so initial deployments create no schedules and later changes are never synchronized. The parent implementation explicitly fell back to reading vercel.json; retain that discovery path—extracting its crons field if necessary to satisfy the newly strict Upstand schema—rather than silently removing the existing flow.
Useful? React with 👍 / 👎.
What changed
httpMethodand encrypted resource environment references instead of storing bearer tokens inupstand.json.0.1.151.Why
The prior backup runtime enriched destinations with a CA certificate but did not pass that value into rclone construction, so private S3-compatible endpoints ignored their configured trust chain. Certificate deletion could also clear an active S3 reference through the foreign key behavior. Cron configuration previously accepted secret values in repository configuration, so it now stores only the encrypted environment variable name.
Validation
bun run check-typesbun run test— 10 successful Turbo tasks; 16 local E2E tests skipped as expectedbun run db:check